<?php
//版权所有(C) 2014 www.ilinei.com

namespace ilinei;

//数据库
class database{
    //获取当前数据库驱动器
    public static function instance($config = array()){
        if($config['database']['driver'] == 'oracle') return new database_oracle($config);
        elseif($config['database']['driver'] == 'pdo') return new database_pdo($config);

        return new database_mysql($config);
    }
}
?>